/*
 * @Descripttion: 
 * @version: 
 * @Author: turingchang
 * @Date: 2020-08-28 11:42:53
 * @LastEditors: turingchang
 * @LastEditTime: 2020-08-28 11:55:16
 */

 const crypto =require('crypto');

var md5 ={};

md5.md5 =function(s,toUpper =false){
    var res = crypto.createHash('md5').update(s).digest("hex");
    if(toUpper){
        res=res.toUpperCase();
    }
    return res;
}

module.exports =md5;